import request from '@/utils/request'

// 查询资讯-评论列表
export function listComment(query) {
  return request({
    url: '/ypp/comment/list',
    method: 'get',
    params: query
  })
}
// 查询资讯列表
export function getActivityList(query) {
  return request({
    url: '/ypp/comment/getActivityList',
    method: 'get',
    params: query
  })
}

// 查询资讯-评论详细
export function getComment(id) {
  return request({
    url: '/ypp/comment/' + id,
    method: 'get'
  })
}

// 新增资讯-评论
export function addComment(data) {
  return request({
    url: '/ypp/comment',
    method: 'post',
    data: data
  })
}

// 修改资讯-评论
export function updateComment(data) {
  return request({
    url: '/ypp/comment',
    method: 'put',
    data: data
  })
}

// 删除资讯-评论
export function delComment(id) {
  return request({
    url: '/ypp/comment/' + id,
    method: 'delete'
  })
}

// 导出资讯-评论
export function exportComment(query) {
  return request({
    url: '/ypp/comment/export',
    method: 'get',
    params: query
  })
}

// 通过资讯-评论
export function releaseComment(id) {
  return request({
    url: '/ypp/comment/release/' + id,
    method: 'post'
  })
}

// 不通过资讯-评论
export function coverComment(data) {
  return request({
    url: '/ypp/comment/cover',
    method: 'post',
    data:data
  })
}
